<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            /* 景深  800-1200*/
            perspective: 1000px;
        }

        .box {
            width: 300px;
            height: 300px;
            position: relative;
            margin: 100px auto;
            /* 盒子呈现3d空间 */
            transform-style: preserve-3d;

            transition: 2s;
        }

        .box:hover {
            transform: rotateY(360deg) rotateX(360deg) rotateZ(360deg);
        }

        .box div {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            position: absolute;
            top: 0;

            text-align: center;
            line-height: 300px;
            font-size: 50px;
        }

        .box div:nth-child(1) {
            transform: translateZ(150px);
        }

        .box div:nth-child(2) {
            transform: translateZ(-150px);
        }

        .box div:nth-child(3) {
            transform: translateX(150px) rotateY(90deg);
        }

        .box div:nth-child(4) {
            transform: rotateY(90deg) translateZ(-150px);
        }

        .box div:nth-child(5) {
            transform: translateY(-150px) rotateX(90deg);
        }

        .box div:nth-child(6) {
            transform: translateY(150px) rotateX(90deg);
        }
    </style>
</head>

<body>

    <!-- 
        3d效果
            景深     近大远小    perspective
            3d显示    transform-style:preserve-3d
     -->

    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
    </div>

</body>

</html>